
import request from '@/utils/request'

const api = {
    getAwardConfigDetail: '/v1/award/config/detail', // 推广佣金设置详情
    saveAwardConfig: '/v1/award/config/save', // 保存推广佣金设置
    getAwardConfigRecord: '/v1/award/config/update/record/page/list', // 获取推广佣金设置修改记录列表
    businessManageList: '/v1/business/manage/page/list', // 商户经理列表信息
    createBusinessManage: '/v1/business/manage/create', // 新增商务经理
    updateBusinessManage: '/v1/business/manage/update', // 编辑商务经理
    changeBusinessManageState: '/v1/business/manage/state/change', // 商务经理状态切换
}

// 推广佣金设置详情
export function getAwardConfigDetail () {
    return request({
        url: api.getAwardConfigDetail,
        method: 'get',
        headers: {
            'name':'getAwardConfigDetail',
        },
        params: {}
    })
}

// 保存推广佣金设置
export function saveAwardConfig (parameter) {
    return request({
        url: api.saveAwardConfig,
        method: 'post',
        headers: {
            'name':'saveAwardConfig',
        },
        data: parameter
    })
}

// 获取推广拥挤设置修改记录列表信息
export function getAwardConfigRecord (parameter) {
    return request({
        url: api.getAwardConfigRecord,
        method: 'get',
        headers: {
            'name':'getAwardConfigRecord',
        },
        params: parameter
    })
}


// 商务经理列表信息
export function businessManageList (parameter) {
    return request({
        url: api.businessManageList,
        method: 'get',
        headers: {
            'name':'businessManageList',
        },
        params: parameter
    })
}

// 新增商务经理
export function createBusinessManage (parameter) {
    return request({
        url: api.createBusinessManage,
        method: 'post',
        headers: {
            'name':'createBusinessManage',
        },
        data: parameter
    })
}

// 编辑商务经理
export function updateBusinessManage (parameter) {
    return request({
        url: api.updateBusinessManage,
        method: 'post',
        headers: {
            'name':'updateBusinessManage',
        },
        data: parameter
    })
}

// 商务经理状态切换
export function changeBusinessManageState (parameter) {
    return request({
        url: api.changeBusinessManageState,
        method: 'post',
        headers: {
            'name':'changeBusinessManageState',
        },
        data: parameter
    })
}